import request from '@/utils/request'

// 用户主页
export function getAllUsers(pageNo, size) {
    return request({
        url: '/admin/users',
        method: 'get',
        params: { pageNo: pageNo, size: size}

    })
}
export function getBooks(pageNo, size) {
    console.log(1+request)
    return request({
        url: '/admin/books',
        method: 'get',
        params: { pageNo: pageNo, size: size}

    })
}
export function getTests(pageNo, size) {
    return request({
        url: '/admin/tests',
        method: 'get',
        params: { pageNo: pageNo, size: size}

    })
}
export function addAdmin(id) {
    return request({
        url: '/admin/addAdmin',
        method: 'get',
        params: {id}

    })
}
export function deleteBook(bookId) {
    return request({
        url: '/admin/deleteBook',
        method: 'get',
        params: {bookId}

    })
}
export function deleteTest(id) {
    return request({
        url: '/admin/deleteTest',
        method: 'get',
        params: {id}

    })
}